
import sys
sys.path.append('../common_code')
import matplotlib.pyplot as plt
from visualization import graph_visualization as gv
from project_gcl_ls_mdp.common_code.function_datasets import random_graph_data as rgd

plotobj = gv.visal_graph()
g_obj = rgd.random_graph()

fig = plt.figure()
ax1= fig.add_subplot(231)


num_node,num_cluster,pin,pout = 50, 4, 0.5, 0.01
adjacency_matrix,labels_vector,G = g_obj.clustered_random_graph(num_node,num_cluster,pin,pout)

plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(a) CRG')

ax2= fig.add_subplot(232)
num_node = 20
adjacency_matrix,labels_vector,G = g_obj.gnp_random_graph(num_node, pin, seed=None)
plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(b) GNP')

ax3= fig.add_subplot(233)
num_node,tries = 50,10000
adjacency_matrix, labels_vector, G = g_obj.random_powerlaw_tree(num_node, tries, gamma=3, seed=None)
plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(c) RPT')

ax4= fig.add_subplot(234)
num_node= 50
adjacency_matrix, labels_vector, G = g_obj.random_tree(num_node, seed=None, create_using=None)
plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(d) RT')

ax5= fig.add_subplot(235)
num_cliques, clique_size = 10,5
adjacency_matrix, labels_vector, G = g_obj.ring_cliques(num_cliques, clique_size)
plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(e) RC')

ax6= fig.add_subplot(236)
m1, m2 = 10,5
adjacency_matrix, labels_vector, G = g_obj.barbell_graph(m1, m2, create_using=None)
plotobj.graph_from_numpy_plot(adjacency_matrix)
plt.title('(e) BG')

plt.show()